package com.shameit.goodqrinfomanager.adapter;

import android.view.View;

import androidx.annotation.NonNull;
import androidx.databinding.ViewDataBinding;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.shameit.goodqrinfomanager.bean.enity.MenuBean;
import com.shameit.goodqrinfomanager.databinding.ItemMenuBinding;

import org.jetbrains.annotations.NotNull;

public class MenuAdapter extends BaseQuickAdapter<MenuBean, BaseDataBindingHolder<ItemMenuBinding>> {

    public MenuAdapter(int layoutResId) {
        super(layoutResId);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemMenuBinding> itemMenuBindingBaseDataBindingHolder, MenuBean menuBean) {
        if (itemMenuBindingBaseDataBindingHolder != null) {
            itemMenuBindingBaseDataBindingHolder.getDataBinding().setData(menuBean);
        }
    }
}
